<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../baselist.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>

    <script type="text/javascript" src="../../js/datepicker/WdatePicker.js"></script>
    <script type="text/javascript">
        function setFactoryName(val) {
            var factoryName= document.getElementById("factoryName")
            factoryName.value=val;
        }
    </script>
</head>
<body>
<form method="post">
    <div id="menubar">
        <div id="middleMenubar">
            <div id="innerMenubar">
                <div id="navMenubar">
                    <ul>
                        <li id="save"><a href="#" onclick="formSubmit('toupdateExtCp.action','_self');">确定</a></li>
                        <li id="back"><a href="#" onclick="formSubmit('productCreate.action?contractProductId=${contractProductId}','_self');">返回</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="textbox" id="centerTextbox">

        <div class="textbox-header">
            <div class="textbox-inner-header">
                <div class="textbox-title">
                    新增附件信息
                </div>
            </div>
        </div>
        <div>
            <div>
                <input type="text"  name="contractProductId" value="${contractProductId}">
                <table class="commonTable" cellspacing="1">
                    <tr>
                        <td class="columnTitle_mustbe">生产厂家：</td>
                        <td  class="tableContent">
                            <select name="factoryId" onchange="setFactoryName(this.options[this.selectedIndex].text);">
                                <option value="">--请选择--</option>
                                <c:forEach items="${factoryList}" var="f">
                                    <option value="${f.id}" <c:if test="${extCProduct.factoryId==f.id}">selected</c:if>>${f.factoryName}</option>
                                </c:forEach>
                            </select>
                            <input type="hidden" id="factoryName"  name="factoryName" value=""/>
                        </td>


                        <td class="columnTitle_mustbe">类型</td>
                        <td class="tableContent">
                            <select name="ctype">
                                <option value="">--请选择--</option>
                                <c:forEach items="${type}" var="type">
                                    <option value="${type.id}" <c:if test="${extCProduct.ctype==type.id}">selected</c:if>>${type.name}</option>
                                </c:forEach>
                            </select>
                            <input type="hidden" id="type"  name="type" value=""/>
                        </td>
                    </tr>
                    <tr>
                        <td class="columnTitle_mustbe">货号：</td>
                        <td class="tableContent"><input type="text" name="productNo" value="${extCProduct.productNo}"/></td>
                      <td class="columnTitle_mustbe">图片：</td>
                        <td class="tableContent"><input type="text" name="productImage" value="${extCProduct.productImage}"/></td>
                  </tr>

                  <tr>
                        <td class="columnTitle_mustbe">单价：</td>
                           <td class="tableContent"><input type="text" name="price" value="${extCProduct.price}"/></td>
                        <td class="columnTitle_mustbe">数量：</td>
                           <td class="tableContent"><input type="text" name="cnumber" value="${extCProduct.cnumber}"></td>
                  </tr>

                  <tr>
                      <td class="columnTitle_mustbe">包装单位：</td>
                         <td class="tableContent"><input type="text" name="packingUnit" value="${extCProduct.packingUnit}"/></td>
                      <td class="columnTitle_mustbe">排序号：</td>
                         <td class="tableContent"><input type="text" name="orderNo" value="${extCProduct.orderNo}"/></td>
                     </tr>

                    <tr>
                        <td class="columnTitle_mustbe">商品的描述：</td>
                        <td class="tableContent"><textarea name="productDesc" style="height:120px;">${extCProduct.productDesc}</textarea></td>

                        <td class="columnTitle_mustbe">要求</td>
                        <td class="tableContent"><textarea name="productRequest" style="height:120px;">${extCProduct.productRequest}</textarea></td>
                    </tr>
                </table>
            </div>
        </div>
    </div><br><br>
</form>
</body>
</html>

